<%@ page import="entity.User" %>
<%@ page import="entity.Page" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>图书管理系统</title>
  <link href="css/addBook.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<%!
  Object bookHasExist=null;
%>
<%
  bookHasExist=request.getAttribute("bookHasExist");
  request.removeAttribute("bookHasExist");
%>
<div class="wrap">
  <div class="head">
    <div class="head_left">
      <h2>图书管理系统</h2>
    </div>
    <div class="head_right">
      <div class="show">
        <div class="wel">
          <h3>欢迎您</h3>
        </div>
        <div class="login">
          <input type="text" readonly="readonly" value="<%=session.getAttribute("user")==null?"请先登录":((User)session.getAttribute("user")).getUserId()%>" />
        </div>
      </div>
      <div class="exit">

      </div>
    </div>
  </div>

  <div class="nav">
    <div class="list">
    </div>
  </div>

  <div class="body">
    <div class="list_left">
      <ul>
        <li>
          <a class ="a1"  href="<%=session.getAttribute("user")==null?"login.jsp":"QueryBookByPageServlet"%>">图书管理</a>
        </li>
        <li>
          <a class="a2"  href="<%=session.getAttribute("user")==null?"login.jsp":"QueryUsersByPageServlet"%>">用户管理</a>
        </li>
        <li>
          <a class="a3"  href="<%=session.getAttribute("user")==null?"login.jsp":"RecordsCountByPageServlet"%>">借阅统计</a>
        </li>
        <li>
          <a class="a4"  href="<%=session.getAttribute("user")==null?"login.jsp":"RecordsInformationByPageServlet"%>">图书借阅信息</a>
        </li>
        <li>
          <a class="a5"  href="QuitServlet">安全退出</a>
        </li>
      </ul>
    </div>
    <div class="body_right">
      <div id="search">
        <div id="search_body">
          <form method="post" action="AddBookServlet">
            <div>
              <label>账号</label>
              <input class="in" type="text" name="id" required="required" placeholder="<%=bookHasExist==null?"":"账号重复"%>"/>
            </div>
            <div>
              <label>书名</label>
              <input class="in" type="text" required="required" name="name" />
            </div>
            <div>
              <label>作者</label>
              <input class="in" type="text" required="required" name="author" />
            </div>
            <div>
              <label>出版社</label>
              <input class="in" type="text" required="required" name="publisher" />
            </div>
            <div>
              <label>价格</label>
              <input class="in" type="text" name="price"  required="required" />
            </div>
            <div>
              <input id="update" type="submit" value="添加"/>
              <a id="return" href="QueryBookByPageServlet" >返回</a>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>

  <div class="flooter">
    <div class="foot">
      Copyright &copy; 2022-2032 SSPU-lyx.com 版权所有
    </div>
  </div>
</div>
</body>
</html>